package org.forex.impl.ws;

import java.io.IOException;
import java.util.Map;
import java.util.Optional;

import org.forex.api.ws.AbstractHttpCall;
import org.forex.vo.Order;

public class DeleteOrder extends AbstractHttpCall<Order> {

	public static Map<String, String> parameters;

	private static String accountId="9646994";

	public DeleteOrder() {
		super(Order.class);
	}

	@Override
	public Map<String, String> getParameters() {

//		parameters=new HashMap<String, String>();
//		parameters.put("instrument","EUR_USD");
//		parameters.put("units","2");
//		parameters.put("side","sell");
//		parameters.put("type","market");
//
//		return parameters;
		return null;
	}

	public Optional<Order> delete(Order order) throws IOException{
		return call("/v1/accounts/"+accountId+"/trades/"+order.getId());
	}

	@Override
	public String getHttpMethod() {
		return DELETE;
	}

}
